<!DOCTYPE html>
<html lang="en">
<link rel="stylesheet" th:href="@{/assets/css/colorbox.css}" />
<head th:include="fragments/head::header" />
<body>
<div th:include="fragments/top::top"></div>
<div class="main-container" id="main-container">
    <div class="main-container-inner">
        <div th:include="fragments/left::left" class="sidebar" id="sidebar"></div>
        <div class="main-content">
            <div class="breadcrumbs" id="breadcrumbs">
                <ul class="breadcrumb">
                    <li><i class="icon-home home-icon"></i> <a href="#">首页</a></li>
                    <li><a href="#">用户管理</a></li>
                    <li><a href="/member/list">用户列表</a></li>
                    <!--<li class="active">内容列表</li>-->
                </ul>
            </div>

            <div class="page-content">

                <h3 class="header smaller lighter blue">用户信息</h3>
                <div id="ulId" class=""></div>
                <br/>
                <form method="post" id="edit">
                    <input type="hidden" name="id" id="id" th:value="${user.id}"/>
                    <div  class="tab-pane fade in active">
                        <div class="container">
                            <div class="form-horizontal">
                                <div class="form-group" style="height:29px">
                                    <label class="col-sm-3 control-label no-padding-right blue" for="username"> 姓名：</label>
                                    <input class="col-sm-1" readonly="readonly" name="username" style="width: 15.33333%;" th:value="${user!=null}? ${user.username}"/>
                                </div>
                                <div class="form-group" style="height:29px">
                                    <label class="col-sm-3 control-label no-padding-right blue" for="oaid"> 工号：</label>
                                    <input class="col-sm-1" readonly="readonly" name="oaid" style="width: 15.33333%;" th:value="${user!=null}? ${user.oaid}"/>
                                </div>
                                <div class="form-group" style="height:29px">
                                    <label class="col-sm-3 control-label no-padding-right blue" for="role"> 角色：</label>
                                    <input class="col-sm-1" readonly="readonly" name="role" style="width: 15.33333%;" th:value="-查看用户分配角色-" onclick="selectRole()"/>
                                </div>
                                <div class="form-group" style="height:29px">
                                    <label class="col-sm-3 control-label no-padding-right blue" for="role"> 分配国家组：</label>
                                    <input class="col-sm-1" readonly="readonly" name="role" style="width: 15.33333%;" th:value="-查看用户分配国家组-" onclick="selectGroupRole()"/>
                                </div>
                                <div class="form-group" style="height:29px">
                                    <label class="col-sm-3 control-label no-padding-right blue" for="role"> 是否组负责人：</label>
                                    <select type="" class="col-sm-1 form-control input-sm" id = "isLeader" name="isLeader" style="width:180px;height:25px;" disabled="disabled">
                                        <option value="1" th:selected="${userGroupRelation != null}?${userGroupRelation.leaderStatus ==true}">是</option>
                                        <option value="2" th:selected="${userGroupRelation != null}?${userGroupRelation.leaderStatus ==false}">否</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-primary" id="submits_back">返回</button>
                    </div>
                </form>
                <br/><br/><br/><br/><br/><br/><br/><br/>

            </div>
        </div>

        <div th:include="fragments/bottom::bottom"></div>
    </div>

    <a href="#" id="btn-scroll-up"
       class="btn-scroll-up btn btn-sm btn-inverse"> <i
            class="icon-double-angle-up icon-only bigger-110"></i>
    </a>
</div>

<!-- Modal备注 -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">

        </div>
    </div>
</div>

<div th:include="fragments/js::js"></div>


<!-- page specific plugin scripts -->
<script th:src="@{/assets/js/jquery.dataTables.min.js}"></script>
<script th:src="@{/assets/js/jquery.dataTables.bootstrap.js}"></script>
<script th:src="@{/assets/js/temp.js}" charset="UTF-8"></script>
<!--图片查看器-->
<script th:src="@{/assets/js/jquery.colorbox-min.js}"></script>
<script th:src="@{/layer/layer.js}"></script>
</body>
<script>
    function selectRole() {
        layer.open({
            title: '用户所对应的角色',
            type: 2,
            area: ['250px', '350px'],
            fixed: false, //不固定
            content: '/user/roleTreeDetail'
        });
    }

    function selectGroupRole(){
        layer.open({
            title: '用户所对应的国家组',
            type: 2,
            area: ['250px', '350px'],
            fixed: false, //不固定
            content: '/user/groupTreeDetail'
        });
    }
    $("#submits_back").click(function(){
        location.href="/user";
    })
</script>
</html>
